using System.Web;
using System.Web.Security;

namespace  Source.Web.FrameWork
{
    public interface IFormsAuthentication
    {
        void RedirectFromLoginPage(string username);
        void SignOut();
    }

    public class FormsAuthenticationWrapper : IFormsAuthentication
    {
        public void RedirectFromLoginPage(string username)
        {
            FormsAuthentication.RedirectFromLoginPage(username, false);
        }

        public void SignOut()
        {
            FormsAuthentication.SignOut();
            HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Url.ToString());
        }
    }
}